﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;

namespace FCTC_Web.Models
{
    public class Article:EntityBase
    {
        [Display(Name = "文章标题")]
        [Required(ErrorMessage="请填写文章标题")]
        [MaxLength(200, ErrorMessage = "文章标题长度过长")]
        public string HeadLine
        {
            get;
            set;
        }
        [Display(Name = "文章副标题")]
        [MaxLength(200, ErrorMessage = "文章副标题长度过长")]
        public string SecondHeadLine
        {
            get;
            set;
        }
        [Display(Name = "文章内容")]
        [Required(ErrorMessage = "请填写文章内容，需要导入图片的位置用[$img$]替换")]
        public string Content
        {
            get;
            set;
        }

        [Display(Name = "作者")]
        [Required(ErrorMessage = "请填写文章作者")]
        [MaxLength(50, ErrorMessage = "文章作者名长度过长")]
        public string Author
        {
            get;
            set;
        }
        [Display(Name = "图片")]
        public virtual List<ImageModel> Imgs
        {
            get;
            set;
        }
        [Display(Name = "来源")]
        [Required(ErrorMessage = "来源")]
        public string From
        {
            get;
            set;
        }
        [Display(Name = "文章类型")]
        [Required(ErrorMessage = "文章类型")]
        public string ArticleType
        {
            get;
            set;
        }
        [Display(Name = "录入时间")]
        [Required(ErrorMessage = "录入时间")]
        public DateTime? ReportingTime
        {
            get;
            set;
        }
        [Display(Name = "关键字")]
        //[Required(ErrorMessage = "关键字")]
        public string Keyword
        { get; set; }
 
    }
}